﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmListaRoles.aspx.cs" Inherits="ddcCajamarca.Web.Account.frmListaRoles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="panel panel-primary">
        <div class="panel-heading">
             <h1>Listar Roles</h1>
        </div>

        <div class="panel-body">
             <label class="control-label">Criterio:  </label>
             <asp:TextBox ID="txtNuevoRol" runat="server"/>
             <asp:Button ID="btnCrear" Text="Crear Rol" CssClass="btn btn-primary" runat="server" OnClick="btnCrear_Click"/>
        </div>
        <div class="panel-body">
            <asp:Label ID="lbError" Text="" ForeColor="Red" runat="server" />
        </div>
        <div class="panel-body col-md-3">
            <asp:GridView ID="gvRoles" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" ForeColor="#333333" GridLines="None" CssClass="table">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="Roles" >
                    <ItemTemplate>
                      <%# Container.DataItem.ToString() %>
                    </ItemTemplate>
                  </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="Label1" runat="server" Text="Acciones" Visible="<%# puedeEditar %>"></asp:Label>
                        </HeaderTemplate>
                    <ItemTemplate>
                        <a href="frmListaRoles.aspx?accion=delete&rol=<%#Container.DataItem.ToString() %>"
                            onclick="return confirm('Desea Elininar a: <%# Container.DataItem.ToString() %>');" >
                               Eliminar
                           </a>
                    </ItemTemplate>
                  </asp:TemplateField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
